package cn.chenbonian.crowdfunding.mapper;

import cn.chenbonian.crowdfunding.entity.Auth;
import cn.chenbonian.crowdfunding.entity.AuthExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AuthMapper {

  List<String> selectAssignAuthNameByAdminId(Integer adminId);

  void deleteOldRelationship(Integer roleId);

  void insertNewRelationship(
      @Param("roleId") Integer roleId, @Param("authIdList") List<Integer> authIdList);

  List<Integer> selectAssignAuthIdByRoleId(Integer roleId);

  int countByExample(AuthExample example);

  int deleteByExample(AuthExample example);

  int deleteByPrimaryKey(Integer id);

  int insert(Auth record);

  int insertSelective(Auth record);

  List<Auth> selectByExample(AuthExample example);

  Auth selectByPrimaryKey(Integer id);

  int updateByExampleSelective(@Param("record") Auth record, @Param("example") AuthExample example);

  int updateByExample(@Param("record") Auth record, @Param("example") AuthExample example);

  int updateByPrimaryKeySelective(Auth record);

  int updateByPrimaryKey(Auth record);
}
